<style type="text/css">
    .input-group-addon{padding: 0px 12px!important;}
    .panel .panel-body{padding-top: 0px;}
    table.dataTable thead > tr > th{width: 200px!important;}
    .control-label{font-weight: 500}
    .btn-primary{min-width: 120px;padding-top: 10px;padding-bottom: 10px;border-radius: 3px;font-size: 17px;}


    .Label_btn{padding-bottom: 20px;}
    .Label_btnspan,.chose_li{background: #fff;border:1px solid #ccc;padding:5px 15px;margin-right: 20px;display: inline-block;border-radius: 5px;cursor: pointer;}
    .select2-choices{background-color: #fafafa;border: 1px solid #eee;font-size: 17px;border-radius: 5px;border-top-left-radius: 0;border-bottom-left-radius: 0;cursor: pointer;list-style: none;padding-left: 10px;font-size: 13px;}
    .chose_li{padding: 0px 20px;height: 30px;line-height: 30px;font-size: 14px;background: #6e8cd7;border: 1px solid #6e8cd7;color: #fff;padding:0px 10px;}
    .chose_li span{font-size: 12px!important;margin-left: 5px;}

    .search_condbtn  button{margin-top: -4px;}


    .dataTables_length,.dataTables_info{margin-left: 20px;}
    .Label_btnadd{cursor: pointer;}
    .remind_infoup{position: relative;top: 5px;right: 10px;color:#1c84c6}
</style>
<div class="page-title q-tit-change" style="margin:10px;"> 
    <a href="/customer/index">客户管理</a> >  客户列表
</div>

<div class="row" style="margin:0px;">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="search_input_cont">
                    <div class="search_litile_tit" ><span class="tit_diswidth"></span>搜索条件</div>
                    <div class="search_condition overflow">
                          <!--   <div class="input-group col-md-3 m-b-10">
                                <span class="input-group-addon">注册平台</span>
                                <input type="text" id="example-input1-group1" name="example-input1-group1" class="form-control" placeholder="请输入注册平台">
                            </div> -->
                            <div class="input-group col-md-3 m-b-10">
                                <span class="input-group-addon">客户来源</span>
                                <select class="input-group-select form-control Source">
                                    <option value="">请选择客户来源</option>
                                    <?php
                                        foreach ($ret['opt'] as $key => $value) {
                                            echo '<option value="'.$value['Value'].'">'.$value['Text'].'</option>';
                                        }
                                    ?>
                                </select>
                            </div>
                            <div class="input-group col-md-3 m-b-10">
                                <span class="input-group-addon">手机号码</span>
                                <input type="text" id="example-input1-group1" name="example-input1-group1" class="form-control Phone" placeholder="请输入手机号码">
                            </div>
                            <div class="input-group col-sm-3 m-b-10">
                                <span class="input-group-addon">客户姓名</span>
                                <input type="text" id="example-input1-group1" name="example-input1-group1" class="form-control UserName" placeholder="请输入客户姓名">
                            </div>
                            <div class="input-group col-sm-3 m-b-10 Label_screening" data-toggle="modal" data-target="#custom-width-modal">
                                <span class="input-group-addon">标签筛选</span>
                               <!--  <input type="text" id="example-input1-group1" name="example-input1-group1" class="form-control TagId" placeholder="选择标签筛选" readonly> -->
                               <ul class="select2-choices">
                                   <li class="select2-search-choice" >选择标签筛选</li>
                                   <div>
                                        <!-- <li class="chose_li">标签筛选<span class="ion-close-round"></span></li> -->
                                   </div>
                               </ul>
                            </div>
                            <!-- <div class="search_condbtn" style="height: 65px;"> -->
                                <div class="col-sm-3"></div>
                                <div class="col-sm-3 search_condbtn">
                                    <button class="btn btn-primary m-r-10" type="button" id="btnSearch">
                                        <i class="fa fa-search"></i> 查  询
                                    </button>
                                    <button class="btn  btn-primary changebgr" type="reset" id="btnRefresh">
                                        <i class="fa fa-refresh"></i> 重  置
                                    </button>
                                </div>
                            <!-- </div> -->
                    </div>
                    
                </div>
                <div class="row ">
                    <div class="overflow">
                        <!-- <div class="search_litile_tit fl" style="padding-left: 10px;">客户信息列表</div> -->
                        <div class="search_litile_tit fl" style="margin-left: 10px;"><span class="tit_diswidth"></span>客户信息列表</div>
                        <div class="fr add_client" >
                            <span class="remind_infoup"> 
                                <?php 
                                    if($ret['excel']['code'] == 200){
                                        echo '导入客户成功!';
                                    }else if($ret['excel']['code'] == 100){
                                        echo '导入客户失败!';
                                    }else if($ret['excel']['code'] == 300){
                                        echo '导入表格格式不正确!';
                                    }
                                ?>
                            </span>
                            <button id="addToTable" class="btn btn-primary m-t-5 m-r-10 edit-add-btn" data-toggle="modal" data-target="#con-close-modal" data-toggle="tooltip"> <i class="icon ion-android-add"></i> 添加客户</button>
                            <button  class="btn  btn-primary m-t-5 m-r-10 add_exlce changebgr" data-toggle="modal" data-target="#custom-width-modals" > <i class="icon ion-android-add"></i> 导入客户</button>
                            <!-- <button type="button" class="btn btn-default "  >导入客户</button> -->
                        </div>
                    </div>
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <table id="datatable" class="table table-striped table-bordered">
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>客户姓名</th>
                                    <th>手机号码</th>
                                    <th>性别</th>
                                    <!-- <th>注册平台</th> -->
                                    <th>客户来源</th>
                                    <th>客户类型</th>
                                    <th>添加时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <!-- <tr>
                                    <td>Tiger Nixon</td>
                                    <td>System Architect</td>
                                    <td>Edinburgh</td>
                                    <td>61</td>
                                    <td>2011/04/25</td>
                                    <td>$320,800</td>
                                    <td>$320,800</td>
                                    <td class="option_btn" >
                                        <span   data-toggle="modal" data-target="#con-close-modal" data-toggle="tooltip" >查看</span>
                                        <span>编辑</span>
                                        <span>删除</span>
                                    </td>
                                </tr> -->
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div> <!-- End Row -->

<!-- 添加文件 -->
 <div id="custom-width-modals" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="custom-width-modalLabel" aria-hidden="true" style="display: none;">
    <div class="modal-dialog" style="width:55%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="custom-width-modalLabel" style="text-align: center;font-size:20px; ">导入客户</h4>
            </div>
            <form method="post" action="/customer/index" enctype="multipart/form-data">
                <div class="modal-body" style="padding-bottom: 0px;">
                    <p>提示: 请先 <a style="color:red;" href="/modules/客户导入模板.xlsx">点击下载</a> 导入数据模板.</p>
                    <div class="overflow">
                        <p class="fl"><img src="/modules/img/slefneed/exc.png" style="width: 60px;margin-right: 10px"></p>
                        <div class="fl">
                            <p style="color:red;"> 说明: 仅限上传文件类型(*.xls,*.xlsx)</p>
                            <div><input  type="file" name="file_stu" /></div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn" style="background-color: #6e8cd7;border: 1px solid #6e8cd7;color: #fff;">提交</button>
                </div>
            </form>
        </div>
    </div>
</div>  

<!-- 筛选标签 -->
 <div id="custom-width-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="custom-width-modalLabel" aria-hidden="true" style="display: none;z-index: 555555555555">
    <div class="modal-dialog" style="width:55%;">
        <div class="modal-content" >
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="custom-width-modalLabel" style="text-align: center;font-size:20px; ">选择标签</h4>
            </div>
            <div class="modal-body" style="padding-bottom: 0px;">
                <div class="Label_btn" data-type="100">
                    <!-- <h4>类型</h4> -->
                    <!-- <button type="button" class="btn btn-default ">建材</button> -->
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn choseOk" style="background-color: #6e8cd7;border: 1px solid #6e8cd7;color: #fff;">完成</button>
            </div>
        </div>
    </div>
</div>

<!-- 个人详情 -->
<div id="con-close-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;z-index: 22">
    <div class="modal-dialog"> 
        <div class="modal-content" style="overflow-y: scroll;max-height: 900px;"> 
            <div class="modal-header" style="border-bottom: 0px;"> 
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> 
                <h4 class="modal-title" style="text-align: center;">客户详情</h4> 
            </div> 
            <div class="modal-body" style="padding-top: 0px;"> 
                    <div class="profile-widget text-center curstome_userdetial">
                        <div class="bg-profileinfo">
                            <div class="bg-info bg-profile"></div>
                            <div class="UserPhotoInfo">
                                <img src="" onerror="this.src='/modules/img/slefneed/user_default.png'" class="thumb-lg img-circle img-thumbnail UserPhoto" alt="img" id="Photo">
                                <input type="file" id="file" name="file">
                            </div>
                            <h3 style="margin-bottom: 30px;margin-top: 0px;" class="UserNameText" >巧姐</h3>
                        </div>
                        <div class="row"> 
                            <div class="col-md-6"> 
                                <div class="form-group"> 
                                    <label for="field-3" class="control-label">备注名称</label> 
                                    <input type="text" class="form-control UserRemarkName"  placeholder="请填备注名称" > 
                                </div> 
                            </div>
                            <div class="col-md-6"> 
                                <div class="form-group"> 
                                    <label for="field-3" class="control-label">选择性别</label> 
                                    <select class="form-control " id="Sex">
                                        <option value="-1">保密</option>
                                        <option value="1">男</option>
                                        <option value="0">女</option>
                                    </select>
                                </div> 
                            </div>  
                        </div> 
                        <div class="row"> 
                            <div class="col-md-12"> 
                                <div class="form-group"> 
                                    <label for="field-3" class="control-label">选择分组</label> 
                                    <select class="form-control " id="chose_group">
                                        <!-- <option value="">选择分组</option> -->
                                    </select>
                                </div> 
                            </div> 
                        </div> 
                        <div class="row "> 
                            <div class="col-md-6"> 
                                <div class="form-group"> 
                                    <label for="field-1" class="control-label">联系电话</label> 
                                    <input type="text" class="form-control PhoneInfo" id="field-1" placeholder="" readonly> 
                                </div> 
                            </div> 
                            <div class="col-md-6"> 
                                <div class="form-group"> 
                                    <label for="field-2" class="control-label">常用邮箱</label> 
                                    <input type="text" class="form-control Email" id="field-2" placeholder=""> 
                                </div> 
                            </div> 
                        </div> 
                        <div class="row"> 
                            <div class="col-md-12"> 
                                <div class="form-group"> 
                                    <label for="field-3" class="control-label">客户地址</label> 
                                    <input type="text" class="form-control Address"  placeholder="请填写省市区" > 
                                </div> 
                            </div> 
                        </div> 
                        <div class="row"> 
                            <div class="col-md-6"> 
                                <div class="form-group"> 
                                    <label for="field-4" class="control-label">客户生日</label> 
                                    <input type="date" class="form-control Birthday" id="field-4" placeholder=""> 
                                </div> 
                            </div> 
                            <div class="col-md-6"> 
                                <div class="form-group"> 
                                    <label for="field-5" class="control-label">客户标签</label> 
                                    <ul class="edit_sign">
                                        <!-- <li>已联系</li> -->
                                        <div class="edit_gochose" data-toggle="modal" data-target="#custom-width-modal">选择标签</div>
                                    </ul>
                                </div> 
                            </div> 
                        </div>
                        <div class="row"> 
                            <div class="col-md-12"> 
                                <div class="form-group no-margin"> 
                                    <label for="field-7" class="control-label">客户备注</label> 
                                    <textarea class="form-control autogrow Remark" id="field-7" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 104px;"></textarea> 
                                </div> 
                            </div> 
                        </div> 
                        <div class="modal-footer" style="border-top: 0px;padding-bottom: 15px;margin-right: 20px;"> 
                            <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button> 
                            <button type="button" class="btn btn-info edit_userinfo">修改</button> 
                        </div> 
                    </div>
            </div> 
        </div> 
    </div>
</div>



<script src="/modules/assets/modal-effect/js/classie.js"></script>
<script src="/modules/assets/modal-effect/js/modalEffects.js"></script>
<!-- <script src="/modules/js/address/Area.js"></script> -->
<!-- <script src="/modules/js/address/AreaData_min.js"></script> -->


<script type="text/javascript">
    seajs.use('customer/index');
</script>